package com.example.consumer.controller;

import com.example.consumer.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author lijingyang
 * @Title:
 * @Package
 * @Description:
 * @date 2020/11/2518:23
 */
@Controller
public class OrderController {

    @Autowired
    OrderService orderService;

    @ResponseBody   //以json格式返回
    @RequestMapping("/initOrder")
    public int initOrder(@RequestParam("uid") int a){

        return orderService.initOrder(a);
    }

}